package practicedemo38;

import java.util.Scanner;

public class practicedemo38 {
    //统计字符出现个数（大写字母，小写字母，数字字符）
    public static void main(String[] args) {
        //1.键盘输入
        Scanner sc = new Scanner(System.in);
        System.out.println("输入一个字符串");
        String arr = sc.next();
        //2.遍历进行计数--计数器思想
        int numCount = 0;
        int smallCharacterCount = 0;
        int bigCharacterCount = 0;
        for (int i = 0; i < arr.length(); i++) {
            char c = arr.charAt(i);
            if (c >= 'a' && c <= 'z') {
                smallCharacterCount++;
            } else if  (c >= 'A' && c <= 'Z') {
                bigCharacterCount++;
            }  else {
                numCount++;
            }
        }
        System.out.println(numCount);
        System.out.println(bigCharacterCount);
        System.out.println(smallCharacterCount);
    }
}
